package com.kaigejava.demo.business.enums;

import lombok.Getter;

/**
 * 类型的枚举
 */
public enum TypeEnum {

    B_STATION("b","b站"),
    DY_STATION("dy","抖音"),
    DYU_STATION("dyu","斗鱼"),
    HY_STATION("hy","虎牙"),



    ;
    @Getter
    private String code;

    @Getter
    private String message;


    public static String getMessageByCode(String code){
        for (TypeEnum value : TypeEnum.values()) {
            if(value.getCode().equals(code)){
                return value.getMessage();
            }
        }
        return null;
    }

    TypeEnum(String code,String message){
        this.code = code;
        this.message = message;
    }



}
